from ..api.get import Get
from ..api.post import Post


class Test:
    def setup_method(self):
        self.get = Get()
        self.post = Post()

    def test_check(self):
        name = "水"
        r = self.get.check(name=name)
        print(r.json())
        for item in r.json()["data"]["list"]:
            print(item)

    def test_delete(self):
        goodsId = "1465677"
        r = self.post.delete(goodsId)
        print(r.json())

    def test_add(self):
        goodsSn = "123"
        name = "321-x-x"
        r = self.post.add(goodsSn=goodsSn, name=name)
        print(r.json())

    def test_correct(self):
        goodsId = "1465577"
        goodsSn = "321"
        name = "321-x-x-x-x"
        r = self.post.correct(goodsId=goodsId, goodsSn=goodsSn, name=name)
        print(r.json())
